package DAO;


import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Nobita Chau
 */
public class LanguagesController {
    private final Map<String, Locale> supportedLanguages ;
    private ResourceBundle translation;

    public LanguagesController(String language){
        supportedLanguages = new HashMap();
        supportedLanguages.put("English",Locale.ENGLISH); 
        supportedLanguages.put("Italiano",Locale.ITALIAN);
        translation = ResourceBundle.getBundle("languages", supportedLanguages.get(language));
    }

    public String getWord(String keyword)
    {
        return translation.getString(keyword);
    }
}
